package com.sf.marathon.soul;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.commons.lang.StringUtils;

import lombok.SneakyThrows;

/**
 * 公共
 *
 * @author liutao
 * @create 2017-12-15 下午4:50
 */

public class Common {
    public static AtomicInteger seq = new AtomicInteger(0);

    private Common () {}


    @SneakyThrows
    public static String getGroupNameSeq() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMdd");
        String prefix = simpleDateFormat.format(new Date());
        StringBuilder sb = new StringBuilder(20);
        return StringUtils.leftPad(prefix, 2, String.valueOf(seq.getAndIncrement()));
    }
}
